import { eventHandler, readBody } from "h3";

export default eventHandler(async (event) => {
  const obj = await readBody(event);
  const accessToken = generateAccessToken({
    username: "admin",
    password: "123456",
  });
  const refreshToken = generateRefreshToken({
    username: "admin",
    password: "123456",
  });
  console.log(accessToken);
  console.log(refreshToken);
  console.log(obj);
  return {
    message: obj,
    accessToken,
    refreshToken,
  };
});
